<%= form_for(@section) do |f| %>
  <% if @section.errors.any? %>
    <div id="error_explanation">
      <h2><%= pluralize(@section.errors.count, "error") %> prohibited this section from being saved:</h2>

      <ul>
      <% @section.errors.full_messages.each do |msg| %>
        <li><%= msg %></li>
      <% end %>
      </ul>
    </div>
  <% end %>

  <div class="field">
    <%= f.label :vote_id %><br />
    <%#= f.number_field :vote_id %>
    <%= collection_select(:section, :vote_id, Vote.all, :id, :title) %>
    <%# votes_array = Vote.all.map { |vote| [vote.title, vote.id] } %>

    <%# f.select :vote_id,options_for_select(votes_array) %>
  </div>
  <div class="field">
    <%= f.label :title %><br />
    <%= f.text_field :title %>
  </div>
  <div class="field">
    <%= f.label :subtitle %><br />
    <%= f.text_field :subtitle %>
  </div>
  <div class="field">
    <%= f.label :instruction %><br />
    <%= f.text_area :instruction %>
  </div>
  <div class="field">
    <%= f.label :note %><br />
    <%= f.text_area :note %>
  </div>
  <div class="actions">
    <%= f.submit %>
  </div>
<% end %>
